package com.xinxuan.contentcenter.controller;

/**
 * @author xinsl
 * @date 2022/1/13
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xinxuan.contentcenter.domain.Notice;
import com.xinxuan.contentcenter.service.NoticeService;

import lombok.extern.slf4j.Slf4j;

/**
 * @author xinsl
 * @date 2021/11/10
 */
@Slf4j
@RestController
@RequestMapping("/notices")
public class NoticesController {

    @Autowired
    private NoticeService noticeService;

    @GetMapping("/newest")
    public Notice newest() {
        return noticeService.newest();
    }

}
